STEP 16: Let's add the loop that will draw the spiral! Click on the LOGIC tab in the toolkit to find the Loops section.

  • Go to and drag out Loop with Range.
  • Go to and drag out Move Forward. Drop it INSIDE the for loop. Change the number to 4.

To put a line of code inside a loop, it must be indented four spaces.You'll see a purple block ····¬ next to any code that is correctly indented.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("field") sprite = codesters.Sprite("hedgehog") sprite.set_size(.5) sprite.pen_down() sprite.set_color("yellow")
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)